#!/bin/bash

# parameter 1: work directory
# parameter 2: sink-uri
# parameter 3: log suffix

set -e

workdir=$1
sink_uri=$2
log_suffix=$3
pwd=$pwd

echo "[$(date)] <<<<<< START kafka consumer in $TEST_NAME case >>>>>>"
cd $workdir
cdc_kafka_consumer --log-file $workdir/cdc_kafka_consumer$log_suffix.log --log-level info --upstream-uri $sink_uri --downstream-uri mysql://root@127.0.0.1:3306/ >>$workdir/cdc_kafka_consumer_stdout$log_suffix.log 2>&1 &
cd $pwd
